package net.chenlin.dp.modules.business.dao;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import net.chenlin.dp.modules.business.entity.po.DistrictPo;
import net.chenlin.dp.modules.business.entity.po.DistrictTreePo;
import net.chenlin.dp.modules.business.entity.vo.districtManage.DistrictManageListVo;
import net.chenlin.dp.modules.business.entity.vo.districtManage.DistrictTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author Yangsm
 * @MapperName: DeviceRegisterMapper
 * @Description: TODO
 * @date 2023年01月31日 20:30
 */
@Mapper
public interface DistrictManageMapper {

    List<DistrictManageListVo> getDistrictList(@Param("page") Page<DistrictManageListVo> page, @Param("query") Query query);

    List<Integer> getDeviceStatus(Long districtId);

    Integer getCurMeteringDays(Long districtId);

    List<String> getDeviceNoList(Long districtId);

    Date getDateTime(String deviceNo);

    int insetDistrict(DistrictPo districtPo);

    void insertDistrictTree(List<DistrictTreePo> districtTreePoList);

    List<DistrictTreeVo> getDeviceById(Long districtId);

    void deleteDistrictById(Long districtId);

    int deleteDistrictTreeById(Long districtId);

    void updateDistrict(DistrictPo districtPo);

    String getName(Long districtId);

    int getCountByDeviceNo(String deviceNo);
}
